package org.musicmod.plugin.example;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

public class MetaChangedReceiver extends BroadcastReceiver {

	private String artist = "<unknown>";
	private String track = "<unknown>";
	private String album = "<unknown>";

	@Override
	public void onReceive(Context context, Intent intent) {
		try {
			Bundle bundle = intent.getExtras();
			artist = bundle.getString("artist");
			track = bundle.getString("track");
			album = bundle.getString("album");
			Log.d(Constants.LOG_TAG, "Nowplaying: " + artist + " - " + album
					+ " - " + track);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}